<!-- TEMPLATE header1 -->
<div class="container">
  <div class="row">
    <div class="span3">
        <a href="/"><img src="/data/100_100/${shop.image.filename}" /></a>
    </div>
    <div class="span4">
        <div id="slogan"><strong>${shop.title}<br>${shop.description}</strong></div>
    </div>
    <div class="span5 odstep">                                        
          <a class="btn btn-warning pull-right" href="/konto"><i class="icon-user icon-white"></i> ${user.user_name}</a>
          <div class="btn-group prawo pull-right">
            <a class="btn dropdown-toggle btn-warning" data-toggle="dropdown" href="#" id="koszykInfoB">
              <i class="icon-shopping-cart icon-white"></i> Корзина<span class="caret"></span>
            </a>
            <ul class="dropdown-menu" id="koszykInfo">
              <div id="koszyk_content">
                <p>Ваша корзина пуста</p>
              </div>
            </ul>
          </div>
    </div>
  </div>
  <div class="navbar">
    <div class="navbar-inner">
      <div class="container">
       <ul class="nav">
           <li><a href="/"><i class="icon-home"></i></a></li>                          
        
          <li class="dropdown">
          <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">
                Категории
                <b class="caret"></b>
          </a>
              <ul class="dropdown-menu">
                  {{each shop.categories}}
                      <li><a href="/#!category/${category_id}">${title}</a></li>
                  {{/each}}
              </ul>
          </li>
          <li class="dropdown">
          <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">
                Статьи
                <b class="caret"></b>
          </a>
              <ul class="dropdown-menu">
                {{each shop.articles}}
                    <li><a href="/#!article/${article_id}">${title}</a></li>
                {{/each}}
              </ul>
          </li>  
         
          <li><a href="/!#new">Новинки</a></li>                           
          <li><a href="/!#popular">Популярное</a></li> 
      
          <li class="divider-vertical"></li>
          
          <li><a href="/pomoc"><i class="icon-info-sign"></i> Вопросы</a></li>
          <li><a href="/kontakt"><i class="icon-envelope"></i> Контакты</a></li>                                                    
      </ul>    
      <form class="navbar-search pull-right" action="/szukaj" method="get">
        <input type="text" class="search-query input" placeholder="Искать" name="q">
      </form>  
          
      </div>
    </div>
  </div>
</div>
<!-- TEMPLATE header -->
<div class="navbar navbar-inverse" style="margin-bottom:0;">
  <div class="navbar-inner" style='border-radius:0'>
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" href="#!main">${shop.name}</a>
      <div class="nav-collapse collapse navbar-inverse-collapse">
        <ul class="nav">
          <li class="active"><a href="#!main"><i class="icon-home icon-white"></i> Главная</a></li>
          <li><a href="javascript:void(0)" class="basketButton"><i class="icon-shopping-cart icon-white"></i> Корзина <span id='basketStatus'>{{if basketCount}}${basketCount}{{/if}}</span><span id='basketEmpty'{{if basketCount}} style='display:none'{{/if}}>пуста</span></a></li>
          <li id='listLink'{{if listCount}}{{else}} style='display:none'{{/if}}><a href="javascript:void(0)" class="listButton"><i class="icon-bookmark icon-white"></i> Отложенные <span id='listStatus'>${listCount}</span></a></li>
          <li id='comparisionLink'{{if comparisionCount}}{{else}} style='display:none'{{/if}}><a href="#!comparision"><i class="icon-resize-small icon-white"></i> Сравнить <span id='comparisionStatus'>${comparisionCount}</span></a></li>
        </ul>
        
        <ul class="nav pull-right">
          <li>
            <form class="navbar-search pull-left" action="">
              <input type="text" class="search-query span3" placeholder="Поиск">
            </form>
          </li>
          <li class="divider-vertical"></li>
          <li class="dropdown">
            <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user icon-white"></i> ${user.user_name} <b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="#">Профиль</a></li>
              <li><a href="#">Выход</a></li>
            </ul>
          </li>
        </ul>
      </div><!-- /.nav-collapse -->
    </div>
  </div><!-- /navbar-inner -->
</div>
<ul class="breadcrumb" id="breadcrumb"><li>&nbsp;</li></ul>
<div class="container-fluid">
  <div class="row-fluid">
    <div class="span3" id="leftContent">
      Sidebar content
    </div>
    <div class="span9" id="generalContent">
      Body content
    </div>
  </div>
</div>
<!-- TEMPLATE breadcrumb_element -->
{{if href}}
<li><a href="${href}">${title}</a><span class="divider">/</span></li>
{{else}}
<li class="active">${title}</li>
{{/if}}
<!-- TEMPLATE left -->
<div class='well span12'>
  <div><img src="/data/origin/${shop.image.filename}" /></div>
  <ul class="nav nav-list  nav-stacked">
    <li class="nav-header">Категории</li>
    {{each shop.categories}}
    <li><a href="/#!category/${category_id}">${title}</a></li>
    {{/each}}
    <li class="nav-header">Статьи</li>
    {{each shop.articles}}
    <li><a href="/#!article/${article_id}">${title}</a></li>
    {{/each}}
  </ul>
</div>
<!-- TEMPLATE main -->
<div class="hero-unit">
  <h1>${shop.title}</h1>
  <p>${shop.description}</p>
</div>

<!-- TEMPLATE big_Header -->
<h1>${title}</h1>

<!-- TEMPLATE product_controll -->
<div id='productContent'>
<div class="well no-lm span12">
  <div class="loadingImage" id="contentLoading"></div>
  <div class="btn-group right">
    <a class="btn selectProductType" data-type="big" href="javascript:void(0)"><i class="icon-th-large"></i></a>
    <a class="btn selectProductType" data-type="med" href="javascript:void(0)"><i class="icon-th-list"></i></a>
    <a class="btn selectProductType" data-type="small" href="javascript:void(0)"><i class="icon-align-justify"></i></a>
  </div>
  <div class='clear'></div>
</div>
<div class="span12 no-lm" id="productList"></div>
</div>

<!-- TEMPLATE big_product_list -->
<ul class="thumbnails"><li class='span1' style='display:none'></li></ul>
<!-- TEMPLATE big_product_list_element -->
  <li class="span3" style='margin-left: 0;margin-right:1.5%; width: 160px;'>
    <div class="thumbnail" style="height:220px;position:relative">
      {{if attributes.image_filename}}<div style='min-height:100px'>
        <center>
          <a href="#!product/${id}">
            <img src="/data/100_100/${attributes.image_filename}" style="border-radius:5px;">
          </a>
        </center>
      </div>{{/if}}
      <div class="caption">
        <h5 style='margin:0'><a href="#!product/${id}">${attributes.title}</a></h5>
        <div style="position:absolute; bottom:40px; right:13px; font-weight:bold ">${attributes.price} ${attributes.currency_name}</div>
        <div style="position:absolute; bottom:10px">{{tmpl(attributes) "in_basket"}}
        <div class='clear'></div>
      </div>
    </div>
  </li>

<!-- TEMPLATE med_product_list -->
<ul class="thumbnails"><li class='span1' style='display:none;'></li></ul>
<!-- TEMPLATE med_product_list_element -->
  <li class="span12" style='margin-left:0'>
  {{if attributes.image_filename}}
    <div class="thumbnail" style="min-height:118px;">
      <div class="caption">
        <div style='min-height:100px; float:left; margin-right:20px;'>
          <a href="#!product/${id}">
            <img src="/data/100_100/${attributes.image_filename}" style="border-radius:5px;">
          </a>
        </div>
        {{tmpl(attributes) "in_basket"}}
        <h4 class='right' style="margin: 5px 20px 0 0;">${attributes.price} ${attributes.currency_name}</h4>
        <h3 style="margin:-6px 0 0 0"><a href="#!product/${id}">${attributes.title}</a></h3>
      
        <div>${attributes.description}</div>
      </div>
    </div>
    {{else}}
    <div class="thumbnail">
      <div class="caption">
        {{tmpl(attributes) "in_basket"}}
        <h4 class='right' style="margin: 5px 20px 0 0;">${attributes.price} ${attributes.currency_name}</h4>
        <h3 style="margin:-6px 0 0 0"><a href="#!product/${id}">${attributes.title}</a></h3>
      
        <div>${attributes.description}</div>
      </div>
    </div>
    {{/if}}
  </li>

<!-- TEMPLATE small_product_list -->
<ul class="thumbnails"><li class='span1' style='display:none'></li></ul>
<!-- TEMPLATE small_product_list_element -->
  <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
    <div class="thumbnail span12">
    <span class='span7'>
      
      <div style="float:left; width:50px;">{{if attributes.image_filename}}
        <a href="#!product/${id}">
          <img src="/data/100_100/${attributes.image_filename}" style="height:30px">
        </a>{{else}}&nbsp;{{/if}}
      </div>

    <h4 style="margin-top:5px; margin-bottom:0"><a href="#!product/${id}">${attributes.title}</a></h4>
  </span>
    <span class='span2' style="text-align:right;padding-top:5px">${attributes.price} ${attributes.currency_name}</span>
    <span class='span3'>
      {{tmpl(attributes) "in_basket"}}
    </span>
  </div>
  </li>

<!-- TEMPLATE article -->
<div id="articleContent">
<h2>${attributes.title}</h2>
<p>
{{if attributes.image_filename}}
  <img src="/data/origin/${attributes.image_filename}" style="border-radius:5px; margin: 0 10px 10px 0; float: left">
{{/if}}
${attributes.description}</p>
<hr/>
<div><i class="icon-list"></i> <span>Категория:</span> <b><a href="#!category/${attributes.category_id}">${attributes.category_title}</a></b></div>
<div><i class="icon-calendar"></i> <span>Дата:</span> <b>${attributes.created}</b></div>
</div>

<!-- TEMPLATE product -->
<div id="productContent">
<div class="row-fluid">
      <div class='span12'>
        <h2>${title}</h2>
        
        <div class='row-fluid'>
          {{if image_filename}}
          <div style="width:460px; float:left">
            <div class="image_gallery_box" rel="productImages" style="float:none"></div>
            <div style="margin: 0 20px 20px 0">
              <div style="float:left; font-size:40px; font-weight:bold;"><span id='price'>${price}</span> ${currency_name}</div>
              {{tmpl() "in_basket"}}
            </div>
          </div>
          {{else}}
          <div style="padding:50px 0">
            <div style="float:left; font-size:25px; font-weight:bold;"><span id='price'>${price}</span> ${currency_name}</div>
            {{tmpl() "in_basket"}}
          </div>
          {{/if}}
          <div style="width:auto">
              {{tmpl(params) "param_show_field"}}
              <hr/>
            <div><i class="icon-list"></i> <span>Категория:</span> <b><a href="#!category/${category_id}">${category_title}</a></b></div>
            <div><i class="icon-calendar"></i> <span>Дата:</span> <b>${created}</b></div>

            <div class="tags"><i class="icon-tags explain" title='Список слов с которыми должна асоциироваться статья'></i>  <span>Метки:</span> {{if tags_count}}{{each tags}}<a href="#!tag/${tag_id}">${tag_title}</a><span class="koma">,</span> {{/each}}{{else}} <b class="gray">Не выбраны</b>{{/if}}</div>
          </div>
        </div>
      </div>
    </div>
<div class="clearfx"></div>   
<hr/>
<p>${description}</p>
<aside><div id='comments'></div></aside>
</div>


<!-- TEMPLATE param_show_field -->
{{if type < 7}}
{{if type > 4 || currentValue}}
<div>
  <div style='float:left; width:200px; font-weight:bold;' title='${description}'>${title}:</div>
  <div>{{tmpl($item.data) $item.data.getTPL(type)}}</div>
</div>
{{/if}}
{{else}}
{{tmpl($item.data) $item.data.getTPL(type)}}
{{/if}}

<!-- TEMPLATE param_show_field_type_0 -->
${currentValue}
<!-- TEMPLATE param_show_field_type_1 -->
${currentValue}
<!-- TEMPLATE param_show_field_type_2 -->
<p>${currentValue}</p>
<!-- TEMPLATE param_show_field_type_3 -->
<i>${currentValue}</i>
<!-- TEMPLATE param_show_field_type_4 -->
<u>${currentValue}</u>
<!-- TEMPLATE param_show_field_type_5 -->
<select name='param_[${param_id}]'>{{each list(values,'list')}}<option value='${$value}'>${$value}</option>{{/each}}</select>
<!-- TEMPLATE param_show_field_type_6 -->
<i class="icon icon-{{if currentValue}}ok{{else}}remove{{/if}}"></i>
<!-- TEMPLATE param_show_field_type_7 -->
<h4 class='text-info'>${title}</h4>
<!-- TEMPLATE param_show_field_type_8 -->
<hr class="control-label span12 no_left_margin" />
<!-- TEMPLATE param_show_field_type_9 -->
<br/>
<!-- TEMPLATE param_show_field_type_10 -->
&nbsp;

<!-- TEMPLATE modal_image -->
  <div class="modal-header" style='padding:0'>
    <div class='alert alert-${type}' style='margin:0'>
    <a class="close" data-dismiss="modal">×</a>
    <h3>${title}</h3>
  </div>
  </div>
  <div class="modal-body" style='max-height:1000px; text-align:center'>{{if img}}<img src="${img}"/>{{else}}Нет картинки{{/if}}</div>

<!-- TEMPLATE in_basket -->
  <div class="btn-group right basket" data-id="${product_id}">
  {{if inBasket}}
    <a class="btn btn-success byeButton" href="javascript:void(0);"><i class="icon-ok icon-white"></i> <span class='basket_text'>Оформить</span></a>
    <a class="btn btn-success dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);"><span class="caret"></span></a>
  {{else}}
    <a class="btn btn-primary byeButton" href="javascript:void(0);"><i class="icon-shopping-cart icon-white"></i> <span class='basket_text'>В корзину</span></a>
    <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);"><span class="caret"></span></a>
  {{/if}}
    <ul class="dropdown-menu">
        <li{{if inList}} class='disabled'{{/if}}><a href="javascript:void(0);" class="addToList" data-id="${product_id}"><i class="icon-bookmark"></i> Отложить</a></li>
        <li{{if inComparision}} class='disabled'{{/if}}><a href="javascript:void(0);" class="addToComparision" data-id="${product_id}"><i class="icon-resize-small"></i> Сравнить</a></li>
        <!--li class="divider"></li>
        <li><a href="javascript:void(0);"><i class="i"></i> Make admin</a></li-->
    </ul>
  </div>

<!-- TEMPLATE category -->
<h1>${attributes.title}</h1>
<p>${attributes.description}</p>

<!-- TEMPLATE tag -->
<h1>${tagName}</h1>

<!-- TEMPLATE categories_list -->
<h1>Категории {{tmpl() "models_to_text"}}</h1>
<ul class="thumbnails">
  {{tmpl(categories) "categories_list_element"}}
</ul>
<!-- TEMPLATE categories_list_element -->
  <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
    <h4><a href="#!category/${attributes.category_id}">${attributes.title}</a></h4>
    <p>${attributes.description}</p>
  </li>

<!-- TEMPLATE models_to_text -->
{{if model=='product'}}продуктов{{else}}
{{if model=='article'}}статей{{/if}}
{{/if}}

<!-- TEMPLATE articles_list -->
<div class="span12 no-lm" id="articleList">
  <ul class="thumbnails">
    <li class='span1' style='display:none;'></li>
  </ul>
</div>
<!-- TEMPLATE articles_list_element -->
  <li class="span12" style='margin-left:0'>
  {{if attributes.image_filename}}
    <div class="thumbnail" style="min-height:118px;">
      <div class="caption">
        <div style='min-height:100px; float:left; margin-right:20px;'>
          <a href="#!article/${id}">
            <img src="/data/100_100/${attributes.image_filename}" style="border-radius:5px;">
          </a>
        </div>
        <h3 style="margin:-6px 0 0 0"><a href="#!article/${id}">${attributes.title}</a></h3>
      
        <div>${attributes.description}</div>
      </div>
    </div>
    {{else}}
    <div class="thumbnail">
      <div class="caption">
        <h3 style="margin:-6px 0 0 0"><a href="#!article/${id}">${attributes.title}</a></h3>
      
        <div>${attributes.description}</div>
      </div>
    </div>
    {{/if}}
  </li>

<!-- TEMPLATE basket_list -->
  <div class="row-fluid">
  <div class="span12" style="padding-bottom:20px;margin:0;">
  <div style="margin:0 20px;">
    <h2>Корзина{{if basketCount == 0}} пуста{{/if}}</h2>
    {{if basketCount}}
    <ul class="thumbnails"><li class='span1' style='display:none'></li>
      {{tmpl(basket) "basket_list_element"}}
    </ul>
    <a class="btn btn-success orderButton" href="#!order"><i class="icon-ok icon-white"></i> <span>Оформить</span></a>
    {{/if}}</div>
  </div>
  </div>

  <!-- TEMPLATE basket_list_element -->
  <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
    <div class="thumbnail span12" style="">
    <span class="span8">
      
      <div style="float:left; width:50px;">{{if attributes.image_filename}}
        <a href="#!product/${id}">
          <img src="/data/100_100/${attributes.image_filename}" style="height:30px">
        </a>{{else}}&nbsp;{{/if}}
      </div>

    <h4 style="margin-top:5px; margin-bottom:0"><a href="#!product/${id}">${attributes.title}</a></h4>
  </span>
    <span class='span1' style="text-align:right;padding-top:5px">1</span>
    <span class='span2' style="text-align:right;padding-top:5px">${attributes.price} ${attributes.currency_name}</span>
    <span class='span1' style="padding-top:2px;"><a class="btn btn-danger btn-small deleteFromBasket" href="javascript:void(0)" data-id='${attributes.product_id}' style="margin-left:-5px;"><i class="icon-remove icon-white"></i></a></span>
  </div>
  </li>

  <!-- TEMPLATE list_list -->
  <div class="row-fluid">
  <div class="span12" style="padding-bottom:20px;margin:0;">
  <div style="margin:0 20px;">
    <h2>Отложенные товары</h2>
    {{if listCount}}
    <ul class="thumbnails"><li class='span1' style='display:none'></li>
      {{tmpl(list) "list_list_element"}}
    </ul>
    {{/if}}</div>
  </div>
  </div>

  <!-- TEMPLATE list_list_element -->
  <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
    <div class="thumbnail span12" style="">
    <span class="span6">
      
      {{if attributes.image_filename}}<div style="float:left; width:50px;">
        <a href="#!product/${id}">
          <img src="/data/100_100/${attributes.image_filename}" style="height:30px">
        </a>
      </div>{{/if}}

    <div style="margin-bottom:0"><a href="#!product/${id}">${attributes.title}</a></div>
  </span>
    <span class='span2'>${attributes.price} ${attributes.currency_name}</span>
    <span class='span3' style="text-align:right;">{{tmpl(attributes) "in_basket"}}</span>
    <span class='span1'><a class="btn btn-danger deleteFromList" href="javascript:void(0)" data-id='${attributes.product_id}' style="margin-left:-5px;"><i class="icon-remove icon-white"></i></a></span>
  </div>
  </li>

  <!-- TEMPLATE comparision -->
  <h1>Сравнение товаров</h1>
  <div id='productContent'>
  <div class="well no-lm span12">
    <div class="loadingImage" id="contentLoading"></div>
    <div class="btn-group right">
    <a class="btn onlyDiff" href="javascript:void(0)"><i class="icon-resize-horizontal"></i> Только различия</a>
  </div>
    <div class='clear'></div>
  </div>
  </div>

  <!-- TEMPLATE comparision_list -->
  {{if comparisionCount}}
  <div class="span12 no-lm" id="comparisonList">
  <ul class="unstyled" ><li class='span1' style='display:none'></li>
    <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
      <span class='span3'></span>
      {{each comparision}}
      <span class='span2'>
        {{if attributes.image_filename}}<div style="width:50px;">
        <a href="#!product/${id}">
          <img src="/data/100_100/${attributes.image_filename}" style="height:30px">
        </a>
        </div>{{/if}}
        <div style="margin-bottom:0"><a href="#!product/${id}">${attributes.title}</a></div>
      </span>
      {{/each}}
    </li>
    {{tmpl(comparisionList) "comparision_list_element"}}
    <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
      <span class='span3'></span>
      {{each comparision}}
      <span class='span2 small_basket'>{{tmpl(attributes) "in_basket"}}</span>
      {{/each}}
    </li>
  </ul></div>
  {{else}}
  Нет выбранных товаров для сравнения!
  {{/if}}

  <!-- TEMPLATE comparision_list_element -->
  <li class="span12" style='margin-left:0; margin-bottom:-1px;display:none;' id='pa_${id}'>
    <span class='span3' title='${attributes.description}'><b>${attributes.title}</b></span>
    {{each attributes.comparision}}
    <span class='span2' data-id='p_${id}'></span>
    {{/each}}
  </li>

<!-- TEMPLATE comment_list -->
<div class="span12 no-lm " id='commentsBlock'>
<hr/>
{{if commentsCount}}
<h3><a href="javascript:void(0)" id='showComments'>Отзывы (${commentsCount})</a></h3>
<ul class="unstyled" id='commentsList' style='display:none'></ul>
<hr/>
{{/if}}
<div id="comment_reply_block">
  <textarea class="span12" rows="5"></textarea>
  <br />
  <a class="btn btn-success right" data-id='${product_id}' href="javascript:void(0)"><i class="icon-white icon-comment"></i> Написать отзыв</a><div class="loadingImage" id="contentLoading" style="float:right; margin-right:10px;"></div>
</div>
</div>

<!-- TEMPLATE comment_list_element -->
<li class="comment well" rel="${comment_id}">
    <b>${user_name}</b>
    <span>${description}</span>
</li>

<!-- TEMPLATE order -->
  <h1>Оформление товаров</h1>
  <div>
  <div class="well no-lm span12">
    <div class="loadingImage" id="contentLoading"></div>
    <div class="muted right" id='orderStep'></div>
    <div class='clear'></div>
  </div>
  </div>

<!-- TEMPLATE order_list -->
  <div class="row-fluid" id='orderContent'>
  <div class="span12" style="padding-bottom:20px;margin:0;">
  <div>
    {{if orderCount}}
    <h3>Ваша корзина</h3>
    <hr/>
    <div style='padding-left:20px'>
    <ul class="thumbnails"><li class='span1' style='display:none'></li>
      {{tmpl(order) "order_list_element"}}
      <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
        <h4 class="span1 offset8"  style="text-align:right;padding-top:5px;" id='totallCount'></h4>
        <h4 class="span2"  style="text-align:right;padding-top:5px"  id='totallPrice'></h4>
      </li>
    </ul>
    </div>
    <a class="btn btn-success right" href="#!order/shiping"><span>Далее</span> <i class="icon-white icon-chevron-right"></i></a>
    {{else}}<h3 class="text-error">Товары не добавлены в корзину!</h3>{{/if}}</div>
  </div>
  </div>

  <!-- TEMPLATE order_list_element -->
  <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
    <div class="thumbnail span12" style="">
    <span class="span8">
      
      <div style="float:left; width:50px;">{{if attributes.image_filename}}
        <a href="#!product/${id}">
          <img src="/data/100_100/${attributes.image_filename}" style="height:30px;border-radius: 3px;">
        </a>{{else}}&nbsp;{{/if}}
      </div>

    <h4 style="margin-top:5px; margin-bottom:0"><a href="#!product/${id}">${attributes.title}</a></h4>
  </span>
    <span class='span1' style="text-align:right;"><input class="elementCount input-mini" data-id='${attributes.product_id}' type='text' value="1" style="margin-bottom:0" /></span>
    <span class='span2' style="text-align:right;padding-top:5px">${attributes.price} ${attributes.currency_name}</span>
    <span class='span1' style="padding-top:2px;"><a class="btn btn-danger btn-small deleteFromBasket" href="javascript:void(0)" data-id='${attributes.product_id}' style="margin-left:-5px;"><i class="icon-remove icon-white"></i></a></span>
  </div>
  </li>

<!-- TEMPLATE order_shiping -->
  <div class="row-fluid" id='orderContent'>
  <div class="span12" style="padding-bottom:20px;margin:0;">
  <div>
    <h3>Способ доставки</h3>
    <hr/>
    <div style='padding-left:20px'>
      {{each shipingList}}
      <label class="radio"><input type="radio" name="orderShipingType" value="${name}" {{if checked}}checked{{/if}}><h5>${title}</h5><div class="muted">${description}</div></label>
      {{/each}}
    </div>
    <br/>
    <h3>Адрес доставки</h3>
    <hr/>
    <div style='padding-left:20px'>
        {{if haveAddress}}
        <div data-type="addressSelectType">
          <label class="radio"><input type="radio" name="orderShipingAddress" value="0" {{if data==1}}checked{{/if}}>По умолчанию</label>
          <div></div>
          <label class="radio"><input type="radio" name="orderShipingAddress" value="1" {{if data==1}}{{else}}checked{{/if}}>Другой</label>
        </div>
        {{/if}}
        <div class="form-horizontal">
          <div class="control-group">
            <label class="control-label" for="inputCountry"><b>Страна</b></label>
            <div class="controls">
              {{if haveAddress}}<div class="addressInfo">${userInfo.user_country}</div>{{/if}}
              <input type="text" id="inputCountry" {{if haveAddress}}style='display:none'{{/if}} {{if data==1}}{{else}}value="${data.Country}"{{/if}}/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="inputCity"><b>Город</b></label>
            <div class="controls">
              {{if haveAddress}}<div class="addressInfo">${userInfo.user_city}</div>{{/if}}
              <input type="text" id="inputCity" {{if haveAddress}}style='display:none'{{/if}} {{if data==1}}{{else}}value="${data.City}"{{/if}}/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="inputAddress"><b>Адрес</b></label>
            <div class="controls">
              {{if haveAddress}}<div class="addressInfo">${userInfo.user_address}</div>{{/if}}
              <input type="text" id="inputAddress" {{if haveAddress}}style='display:none'{{/if}} {{if data==1}}{{else}}value="${data.Address}"{{/if}}/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="inputName"><b>ФИО получателя</b></label>
            <div class="controls">
              {{if haveAddress}}<div class="addressInfo">${userInfo.user_name}</div>{{/if}}
              <input type="text" id="inputName" {{if haveAddress}}style='display:none'{{/if}} {{if data==1}}{{else}}value="${data.Name}"{{/if}}/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="inputTel"><b>Телефон получателя</b></label>
            <div class="controls">
              {{if haveAddress}}<div class="addressInfo">${userInfo.user_tel}</div>{{/if}}
              <input type="text" id="inputTel" {{if haveAddress}}style='display:none'{{/if}} {{if data==1}}{{else}}value="${data.Tel}"{{/if}}/>
            </div>
          </div>
        </div>
    </div>
    <a class="btn btn-success right" href="#!order/paying" style="margin-left:10px"><span>Далее</span> <i class="icon-white icon-chevron-right"></i></a>&nbsp;<a class="btn right" href="#!order"><i class=" icon-chevron-left"></i> <span>Назад</span></a>
    </div>
  </div>
  </div>

  <!-- TEMPLATE order_paying -->
  <div class="row-fluid" id='orderContent'>
  <div class="span12" style="padding-bottom:20px;margin:0;">
  <div>
    <h3>Способ оплаты</h3>
    <hr/>
    <div style='padding-left:20px'>
      {{each payMethod}}
      <label class="radio"><input type="radio" name="orderPayingType" value="${name}" {{if checked}}checked{{/if}}><h5>${title}</h5><div class="muted">${description}</div></label>
      {{/each}}<br/>
    </div>
      <h3>Коментарий к заказу</h3>
      <hr/>
    <div style='padding-left:20px'>
      <textarea id='orderComment' class="span12" rows="5">{{if data.comment}}${data.comment}{{/if}}</textarea>
    </div>
    <a class="btn btn-success right" href="#!order/resume" style="margin-left:10px"><span>Далее</span> <i class="icon-white icon-chevron-right"></i></a>&nbsp;<a class="btn right" href="#!order/shiping"><i class=" icon-chevron-left"></i> <span>Назад</span></a>
    </div>
  </div>
  </div>

  <!-- TEMPLATE order_resume -->
  <div class="row-fluid" id='orderContent'>
  <div class="span12" style="padding-bottom:20px;margin:0;">
  <div>
    <h3>Итого</h3>
    <hr/>
    <div style='padding-left:20px'>
    <ul class="thumbnails"><li class='span1' style='display:none'></li>
      {{tmpl(order) "order_resume_element"}}
      <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
        <h4 class="span1 offset8"  style="text-align:right;padding-top:5px;" id='totallCount'></h4>
        <h4 class="span2"  style="text-align:right;padding-top:5px"  id='totallPrice'></h4>
      </li>
    </ul>
    </div>
    <h3>Доставка</h3>
    <hr/>
    <div style='padding-left:20px'>
    <b>${shipingInfo.title}</b><span class="muted"> - ${shipingInfo.description}</span>
    </div>
    <h3>Адрес доставки</h3>
    <hr/>
    <div style='padding-left:20px'>
      <div><b>Страна</b> - {{if data.address == 1}}${userInfo.user_country}{{else}}${data.Country}{{/if}}</div>
      <div><b>Город</b> - {{if data.address == 1}}${userInfo.user_city}{{else}}${data.City}{{/if}}</div>
      <div><b>Адрес</b> - {{if data.address == 1}}${userInfo.user_address}{{else}}${data.Address}{{/if}}</div>
      <div><b>ФИО получателя</b> - {{if data.address == 1}}${userInfo.user_name}{{else}}${data.Name}{{/if}}</div>
      <div><b>Телефон получателя</b> - {{if data.address == 1}}${userInfo.user_tel}{{else}}${data.Tel}{{/if}}</div>
    </div><br/>
    </div>
    <h3>Оплата</h3>
    <hr/>
    <div style='padding-left:20px'>
    <b>${payInfo.title}</b><span class="muted"> - ${payInfo.description}</span>
    </div>
    {{if data.comment}}
    <h3>Коментарий к заказу</h3>
    <hr/>
    <div style='padding-left:20px'>${data.comment}</div>
    {{/if}}
    <br/>
    <a class="btn btn-success right" id='buyButton' href="javascript:void(0)" style="margin-left:10px"><span>Далее</span> <i class="icon-white icon-chevron-right"></i></a>&nbsp;<a class="btn right" href="#!order/paying"><i class=" icon-chevron-left"></i> <span>Назад</span></a>
    </div>
  </div>
  </div>

  <!-- TEMPLATE order_resume_element -->
  <li class="span12" style='margin-left:0; margin-bottom:5px;'>
    <div class="span12">
    <span class="span8">
      <div style="float:left; width:50px;">{{if attributes.image_filename}}
          <img src="/data/100_100/${attributes.image_filename}" style="height:30px;border-radius: 3px;">
        {{else}}&nbsp;{{/if}}
      </div>
      <h4 style="margin-top:5px; margin-bottom:0">${attributes.title}</h4>
    </span>
    <span class='span1' style="text-align:right;"></span>
    <span class='span2' style="text-align:right;padding-top:5px">${attributes.price} ${attributes.currency_name}</span>
  </div>
  </li>

  <!-- TEMPLATE order_show -->
  <h1>Ваш  заказ №${id}</h1>
  {{if success}}
  <div class="alert alert-block alert-success">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    <h4>Заказ успешно оформлен</h4>
    Ждите обновления его статуса.
  </div>
  {{/if}}

   <!-- TEMPLATE order_show_info -->
   <hr/>
  <div><i class="icon-calendar"></i> <span>Дата создания:</span> <b>${data.created}</b></div>
  <div><i class="icon-ok"></i> <span>Статус заказа:</span> <b>
  {{tmpl(data) "order_satatus"}}
  </b>{{if data.status_comment && data.status_comment != 0}}<br/>${data.status_comment}{{/if}}</div>
  <hr/>
  <div style='padding-left:20px'>
    <ul class="thumbnails"><li class='span1' style='display:none'></li>
      {{each data.orderList}}
      <li class="span12" style='margin-left:0; margin-bottom:5px;'>
        <div class="span12">
        <span class="span8">
          <div style="float:left; width:50px;">{{if image_filename}}
              <img src="/data/100_100/${image_filename}" style="height:30px;border-radius: 3px;">
            {{else}}&nbsp;{{/if}}
          </div>
          <h4 style="margin-top:5px; margin-bottom:0">${product_title}</h4>
        </span>
        <span class='span1' style="text-align:right;">${product_count}</span>
        <span class='span2' style="text-align:right;padding-top:5px">${totallPrice} ${currency.currency_name}</span>
      </div>
      </li>
      {{/each}}
      <li class="span12" style='margin-left:0; margin-bottom:-1px;'>
        <h4 class="span1 offset8"  style="text-align:right;padding-top:5px;">${totall_count}</h4>
        <h4 class="span2"  style="text-align:right;padding-top:5px">${totall_price} ${currencyData.currency_name}</h4>
      </li>
    </ul>
    </div>

<!-- TEMPLATE order_satatus -->
{{if status==0}} На стадии заполнения{{/if}}
{{if status==1}} Заполнен и сохранён{{/if}}
{{if status==2}} Просмотрен{{/if}}
{{if status==3}} Выполняется{{/if}}
{{if status==4}} Выполнен{{/if}}
{{if status==5}} Отказан{{/if}}

<!-- TEMPLATE order_list -->
  <h1>Ваши  заказы</h1>

<!-- TEMPLATE order_list_element -->
<div class="thumbnail" style='margin-bottom:20px'>
  <div class="caption">
    <h4 class='right' style="margin: 5px 20px 0 0;">{{tmpl() "order_satatus"}}</h4>
    <h3 style="margin:-6px 0 0 0"><a href="#!order/show/${order_id}">Заказ №${order_id}</a></h3>
    <div><i class="icon-calendar"></i> <span>Дата создания:</span> <b>${created}</b></div>
  </div>
</div>

